<%@ page import="com.entity.Blog" %>
<%@ page import="com.service.BlogService" %>
<%@ page import="com.service.BlogServiceImpl" %><%--
  Created by IntelliJ IDEA.
  User: Elle
  Date: 2022/6/18
  Time: 9:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
//详情
    //1、获取请求的数据
    String id = request.getParameter("id");

    //2、操作==》持久化==》数据库
    BlogService blogService = new BlogServiceImpl();
    Blog blog = blogService.findById(Integer.valueOf(id));

    //3、页面跳转==》update.jsp==>传递数据==》blog ==>转发
    request.setAttribute("blog",blog);
    request.getRequestDispatcher("update.jsp").forward(request, response);

%>
